import Vue from 'vue'

// import Cookies from 'js-cookie'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import Element from './elementUi'

import 'muse-ui/src/styles/base.less' // 加载基础的样式
import textField from 'muse-ui/src/textField'

import '@/styles/element-ui.scss' // global css
import '@/styles/index.scss' // global css

import App from './App'
import router from './router'
import store from './store'

import './icons' // icon
import './errorLog' // error log
import './permission' // permission control

import TrenoUI from 'treno-ui' // 侧边抽屉组件

import * as filters from './filters' // global filters

Vue.component(textField.name, textField)
Vue.use(Element, {
  size: 'small'
})

Vue.use(TrenoUI)

// register global utility filters.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

window.__VUE_APP__ = new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
